package com.ss.android.a;

import android.content.SharedPreferences;

import com.bytedance.common.utility.Logger;
import com.bytedance.common.utility.collection.WeakList;
import com.ss.android.common.AppContext;

public final class ABHelper {
    private static ABHelper e;
    public final String[] a = new String[]{
            "clear_literary_type",
            "tt_lite_homepage_ui_type_v2",
            "tt_lite_homepage_ui_type_old_user_v2",
            "tt_lite_reduce_launch_time"};
    public Object[] b;
    public boolean c;
    public String ttLiteReduceLaunchTime;
    private AbManager f;
    private String isTTLiteHomePageUiTypeV2;
    private String ttLiteHomePageUiTypeOldUserV2;

    private ABHelper(AppContext arg4) {
        this.f = AbManager.getInstance(arg4);
        AbManager v0 = this.f;
        b v1 = new b(this);
        com.bytedance.common.utility.collection.c v0_1 = v0.b;
        WeakList v2 = v0_1.a;
        synchronized (v2) {
            v0_1.a.add(v1);
        }

        this.a();
    }

    public static ABHelper a(AppContext arg2) {
        if (ABHelper.e == null) {
            Class v1 = ABHelper.class;
            synchronized (v1) {
                if (ABHelper.e == null) {
                    ABHelper.e = new ABHelper(arg2);
                }
            }
        }

        return ABHelper.e;
    }

    public static String b() {
        return "home_ui_lite";
    }

    final void a() {
        SharedPreferences sp = this.f.getAppSettingsSp();
        this.c = "clean".equals(sp.getString("clear_literary_type", ""));
        this.isTTLiteHomePageUiTypeV2 = sp.getString("tt_lite_homepage_ui_type_v2", "");
        this.ttLiteHomePageUiTypeOldUserV2 = sp.getString("tt_lite_homepage_ui_type_old_user_v2", "");
        this.ttLiteReduceLaunchTime = sp.getString("tt_lite_reduce_launch_time", "");
        if (this.b == null) {
            this.b = new String[4];
        }

        Logger.d("ABHelper", "tt_lite_homepage_ui_type_v2: " + this.isTTLiteHomePageUiTypeV2);
        Logger.d("ABHelper", "tt_lite_homepage_ui_type_old_user_v2: " + this.ttLiteHomePageUiTypeOldUserV2);
    }
}

